package top.yqingyu.trans$server.command.impl;

import io.netty.channel.ChannelHandlerContext;
import top.yqingyu.qymsg.QyMsg;
import top.yqingyu.trans$server.annotation.Command;
import top.yqingyu.trans$server.main.MainConfig;

import java.io.IOException;
import java.util.ArrayList;

@Command
public class WakeOnLine {

    @Command("wakeUp")
    public void wakeUpAll(ChannelHandlerContext ctx, QyMsg msg, ArrayList<QyMsg> rtnMsg) throws IOException {
        Runtime.getRuntime().exec("etherwake -i enp7s0 50:EB:F6:78:31:DE").destroy();
        Runtime.getRuntime().exec("etherwake -i enp7s0 50:EB:F6:78:31:DF").destroy();
        QyMsg clone = MainConfig.NORM_MSG.clone();
        clone.putMsg("completely");
        rtnMsg.add(clone);
    }
}
